package cn.lsh.spark.streaming;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class FileInset {

	public static void main(String[] args) throws Exception {
		while (true) {
			String fileName = "G:\\data\\" + System.currentTimeMillis() + ".txt";
			FileWriter fileWriter = new FileWriter(new File(fileName));
			for (int i = 0; i < 10; i++) {
				fileWriter.write("hello_" + System.currentTimeMillis() + "\n");
				Thread.sleep(1000);
				fileWriter.flush();
			}
			System.out.println(fileName);
			fileWriter.close();
			Thread.sleep(5000);
		}
	}
}
